<template>
	<view class="popup df-c">
		<view class="popup_top df-yc">
			<view class="top_title df-c">
				<image style="width: 497rpx;" :src="temImgUrl+'/popuptext.png'" mode="widthFix">
				</image>
			</view>
			<view class="goods_list">
				<scroll-view scroll-y="true">
					<view class="list_items df">
						<view class="list_item df-yc" v-for="item in ktList">
							<view class="img">
								<image :src="$IMG_URL+item.image" mode="widthFix"></image>
							</view>
							<view style="max-width: 120rpx;" class="name fs22 one-t">{{item.name}}</view>
						</view>
					</view>
				</scroll-view>
				<view class="bottom df-yc jc">
					<text class="text fs24 mt30">请在30天有效期内及时领取</text>
					<view @click="getWard" class="button fb df-c mt30 fs28">立即领取
					</view>
				</view>
			</view>
			<view class="float">
				<view class="float1">
					<image style="width:147rpx;" :src="temImgUrl+'/popup1.png'" mode="widthFix">
					</image>
				</view>
				<view class="float2">
					<image style="width:137rpx;" :src="temImgUrl+'/popup2.png'" mode="widthFix">
					</image>
				</view>
				<view class="float3">
					<image style="width:131rpx;" :src="temImgUrl+'/popup2.png'" mode="widthFix">
					</image>
				</view>
			</view>
			<view class="bg_light">
				<image style="width: 680rpx;" src="../../../static/imgs/images/popuplight.png" mode="widthFix">
				</image>
			</view>
			<view class="close" @click="close">
				<image style="width: 46rpx;" :src="temImgUrl+'/close.png'" mode="widthFix"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			ktList: Array,
			getData: Object
		},
		components: {

		},
		data: function() {
			return {
				temImgUrl: this.$IMG_URL_TEMP
			}
		},
		methods: {
			close() {
				this.$emit('close')
			},
			getWard() {
				this.$api('nodeGame.getWard', {
					game_stage: this.getData.game_stage,
					prizes_type: this.getData.prizes_type
				}).then(res => {
					if (res.code == 1) {
						this.$emit('get_prize_success',JSON.stringify(res.data))
						this.$tools.toast("领取成功")
						this.$emit('close')
					}
				})
			}
		},
		created() {},
		mounted() {},
	}
</script>

<style scoped lang="scss">
	.popup {
		top: 0;
		left: 0;
		position: fixed;
		width: 100vw;
		height: 100vh;
		z-index: 9999;
		background-color: rgba($color: #000000, $alpha: 0.8);

		.popup_top {
			width: 630rpx;
			background: linear-gradient(270deg, #6D1E26, #A94650);
			box-shadow: 0px 5rpx 18rpx 0rpx rgba(83, 24, 30, 0.35);
			border-radius: 30rpx 30rpx 0 0;
			position: relative;
			z-index: 666;
			top: -80rpx;

			.bg_light {
				position: absolute;
				top: -178rpx;
			}

			.close {
				position: absolute;
				bottom: -300rpx;
			}

			.top_title {
				height: 170rpx;

			}

			.goods_list {
				width: 571rpx;
				height: 500rpx;
				background: #FFFFFF;
				box-shadow: 0px 2rpx 24rpx 0rpx rgba(134, 32, 42, 0.3);
				border-radius: 30rpx 30rpx 0 0;
				padding: 30rpx 30rpx 50rpx 30rpx;
				position: relative;

				.list_items {
					flex-wrap: wrap;
					justify-content: space-between;

					.list_item {
						min-width: calc(500rpx/3);
						margin-bottom: 30rpx;

						.img {
							width: 110rpx;
							height: 110rpx;
							background: #FFEEE2;
							border-radius: 50%;
						}

						.name {
							color: #54191F;
							margin-top: 20rpx;
						}
					}
				}

				.bottom {
					color: #FFFFFF;
					width: 630rpx;
					height: 291rpx;
					background: url(../../../static/imgs/images/popup.png);
					background-size: cover;
					background-repeat: no-repeat;
					border-radius: 0 0 30rpx 30rpx;
					position: absolute;
					bottom: -200rpx;
					left: 50%;
					transform: translateX(-50%);

					.button {
						width: 510rpx;
						height: 88rpx;
						background: linear-gradient(1deg, #FFDEC3, #FFF1E9);
						border-radius: 44rpx;
						color: #53181E;
					}
				}
			}
		}

		.float {
			.float1 {
				position: absolute;
				top: -100rpx;
			}

			.float2 {
				position: absolute;
				top: 114rpx;
				left: -50rpx;
			}

			.float3 {
				position: absolute;
				bottom: 100rpx;
				right: -62rpx;
			}
		}

	}
</style>
